package com.code;

public class PackageType {
	
    private final String typeName;
    private final int typeCode;
    private final boolean needResult;
    public boolean isNeedResult() {
		return needResult;
	}
	protected PackageType(String typeName,int typeCode,boolean needResult){
    	this.typeName=typeName;
    	this.typeCode=typeCode;
    	this.needResult=needResult;
    }
	public String getTypeName() {
		return typeName;
	}
	public int getTypeCode() {
		return typeCode;
	}
	
	@Override
	public int hashCode() {
		return typeCode;
	}
	@Override
	public boolean equals(Object obj) {
		if (!PackageType.class.isInstance(obj)) return false;
		PackageType packageType=(PackageType) obj;
		return typeCode==packageType.typeCode;
	}
	@Override
	public String toString() {
		return typeName;
	}
    
}
